import axios from 'axios';

const instance = axios.create();

// axios 响应拦截
instance.interceptors.response.use(
  (respData) => {
    return respData.data;
  },
  (err) => {
    console.log('axiosRespErr :>> ', err.toString());
  }
);

// axios请求拦截
instance.interceptors.request.use(
  (config) => {
    return config;
  },
  (err) => {
    console.log('axiosReqErr :>> ', err.toString());
  }
);

export default instance;
